package com.bean;

import java.sql.Timestamp;
import java.util.List;

/**
 * RoleInfo entity. @author MyEclipse Persistence Tools
 */

public class RoleInfo implements java.io.Serializable {

	// Fields

	/** serialVersionUID*/
	private static final long serialVersionUID = -2316094503386444256L;
	private Integer roleId;
	private String roleName;
	private Integer flag = 1;//'角色标志(0:系统默认角色不可更改，1:可维护角色)'
	private String flagName;
	private Timestamp lastUpdate;
	private Integer status;
	private List<RulerInfo> rulerList ;//权限列表

	// Constructors

	/** default constructor */
	public RoleInfo() {
	}

	/** full constructor */
	public RoleInfo(String roleName, Timestamp lastUpdate, Integer status) {
		this.roleName = roleName;
		this.lastUpdate = lastUpdate;
		this.status = status;
	}

	// Property accessors

	public Integer getRoleId() {
		return this.roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return this.roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public Timestamp getLastUpdate() {
		return this.lastUpdate;
	}

	public void setLastUpdate(Timestamp lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	/**
	 * @return the flag
	 */
	public Integer getFlag() {
		return flag;
	}

	/**
	 * @param flag the flag to set
	 */
	public void setFlag(Integer flag) {
		this.flag = flag;
//		'角色标志(0:系统默认角色不可更改，1:可维护角色)'
		switch(flag){
		case 0:
			this.setFlagName("系统默认");
			break;
		case 1:
			this.setFlagName("可维护角色");
			break;
		default:
			this.setFlagName("未知");
		}
	}

	/**
	 * @return the flagName
	 */
	public String getFlagName() {
		return flagName;
	}

	/**
	 * @param flagName the flagName to set
	 */
	public void setFlagName(String flagName) {
		this.flagName = flagName;
	}

	/**
	 * @return the rulerList
	 */
	public List<RulerInfo> getRulerList() {
		return rulerList;
	}

	/**
	 * @param rulerList the rulerList to set
	 */
	public void setRulerList(List<RulerInfo> rulerList) {
		this.rulerList = rulerList;
	}


}